package com.yuntuzhilian.chapter4.demo1;

/**
 * @author MrWang-shuizhishuiheshui
 * @description 狗类---子类
 * extends:继承    子类 extends 父类
 */
public class Dog extends Pet {
    //属性

    private String strain;

    //构造方法
    public Dog() {
    }
//    public Dog(String name, int health, int love, String strain) {
//        this.name = name;
//        this.health = health;
//        this.love = love;
//        this.strain = strain;
//    }

    //对外方法

    public String getStrain() {
        return strain;
    }
    public void setStrain(String strain) {
        this.strain = strain;
    }
    //展示
    public void show(){
        System.out.println(""+getName()+getHealth()+getLove()+getStrain());
    }
}
